import { http } from "@/utils/http";
// import result from "@/router/modules/result";

/**
 *  自定义获取剧本列表的接口
 */
const getPcToken = () => {
  return localStorage.getItem("pcToken");
};
const baseProxy = import.meta.env.VITE_BASEPROXY;
/** 上传附件 */
export const uploadFileApi = (formData?: object) => {
  return http.request<any>(
    "post",
    `${baseProxy}/login/uploadFile`,
    {
      data: formData
    },
    {
      headers: {
        pcToken: getPcToken(),
        "Content-Type": "multipart/form-data"
      }
    }
  );
};
